import { useState } from "react";
import "./App.scss";
import TabBer from "./component/TabBer";
import { Route, Switch, withRouter } from "react-router-dom";

import Home from "./minPage/Home";
import List from "./minPage/List";
import Find from "./minPage/Find";
import Cart from "./minPage/Cart";
import User from "./minPage/User";
import Login from "./minPage/Login";
import Preferential from "./minPage/preferential";
import Meterhome from "./minPage/find/meterhome";
import Diandetails from "./minPage/find/diandetails";
import Myolder from "../src/component/user/myolder";
import PlaceOrder from "./pages/PlaceOrder";
import Article from "../src/minPage/find/article";
import Selectphone from "../src/minPage/find/Selectphone";
import Wxplay from "./pages/Wxplay";
import Playsuccess from "./pages/Playsuccess";
import Playresolvd from "./pages/Playresolvd";
import Playreject from "./pages/Playreject";
import Orderdetail from "./pages/Orderdetail";
const NewWxplay = withRouter(Wxplay);
function App() {
  return (
    <div className="App">
      <div className="content">
        <Switch>
          <Route path="/" exact>
            <Home />
          </Route>
          <Route path="/List">
            <List />
          </Route>
          <Route path="/Find">
            <Find />
          </Route>
          <Route path="/Cart">
            <Route path="/Cart" exact>
              <Cart />
            </Route>
            <Route path="/Cart/tj">
              <PlaceOrder />
            </Route>
            <Route path="/Cart/play">
              <NewWxplay />
            </Route>
            <Route path="/Cart/success">
              <Playsuccess />
            </Route>
            <Route path="/Cart/resolvd">
              <Playresolvd />
            </Route>
            <Route path="/Cart/reject">
              <Playreject />
            </Route>
            <Route path="/Cart/detail">
              <Orderdetail />
            </Route>
          </Route>
          <Route path="/User">
            <User></User>
          </Route>
          <Route path="/Login">
            <Login />
          </Route>
          <Route path="/preferential">
            <Preferential />
          </Route>
          <Route path="/meterhome">
            <Meterhome />
          </Route>
          <Route path="/diandetails">
            <Diandetails />
          </Route>
          <Route path="/Myolder">
            <Myolder />
          </Route>
          <Route path="/Article">
            <Article />
          </Route>
          <Route path="/Selectphone">
            <Selectphone />
          </Route>
        </Switch>
      </div>
      <TabBer />
    </div>
  );
}

export default App;
